def votes(list1: list) -> dict:
    dict1 = {}
    for tuple_name_value in list1:
        name = tuple_name_value[0]
        value = tuple_name_value[1]
        if name in dict1:
            dict1[name] = value + dict1[name]
        else:
            dict1[name] = value
    return dict1
assert votes([('McCain', 10), ('McCain', 5), ('Obama', 9), ('Obama', 8), ('McCain', 1)]) == {'McCain': 16, 'Obama': 17}